package com.yun.algorithmproblem.leetcode;

public class Leetcode2749 {

    public static void main(String[] args) {
        Leetcode2749 leetcode2749 = new Leetcode2749();
        int num1 = 3;
        int num2 = -2;
        int result = leetcode2749.makeTheIntegerZero(num1, num2);
        System.out.println(result);
    }

    public int makeTheIntegerZero(int num1, int num2) {
        for (long k = 1; k <= num1 - num2 * k; k++) {
            if (k >= Long.bitCount(num1 - num2 * k)) {
                return (int) k;
            }
        }
        return -1;
    }
}
